From: Jim Blandy Date: Sat, 22 May 1993 00:12:17 +0000 (+0000) Subject: * process.c (Fopen_network_stream): Deal with older systems, which X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~96116 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=39a21be6fcd80359ff5c89a5f391b03af6545ecb;p=emacs.git * process.c (Fopen_network_stream): Deal with older systems, which only have the h_addr field in their struct hostent. --- diff --git a/src/process.c b/src/process.c index 2b2fc8304dc..9a1012094dd 100644 --- a/src/process.c +++ b/src/process.c @@ -1448,8 +1448,13 @@ Fourth arg SERVICE is name of the service desired, or an integer\n\ host_info.h_name = 0; host_info.h_aliases = 0; host_info.h_addrtype = AF_INET; - host_info.h_addr_list = &(addr_list[0]); - addr_list[0] = (char*)(&numeric_addr); +#ifdef h_addr + /* Older machines have only one address slot called h_addr. + Newer machines have h_addr_list, but #define h_addr to + be its first element. */ + host_info.h_addr_list = &(addr_list[0]); +#endif + host_info.h_addr = (char*)(&numeric_addr); addr_list[1] = 0; host_info.h_length = strlen (addr_list[0]); }